1. Field of the Invention
The present invention relates to techniques for detecting foreign substance attached to an optical member arranged on a light axis for image capturing and arranged in front of an image pickup device using an image signal supplied from the image pickup device.
2. Description of the Related Art
In general, in a digital single-lens reflex camera having a replaceable lens, foreign substance on the camera such as foreign particles or dust moves because of replacement of lenses, driving of a mirror, and operation of a shutter. Accordingly, the foreign substance may adhere onto a cover glass disposed on a front surface of an image pickup device or a surface of an optical filter (such as a low-pass filter or an infrared cut filter) arranged on a light axis for image capturing. (The cover glass and the optical filter in addition to the image pickup device are collectively called an “image pickup unit” hereinafter.) When an image is captured using such an image pickup unit having a surface to which foreign substance is attached, the captured image is of low quality due to shadows cast by the foreign substance.
To address this sort of problem, a technique is known in which a foreign substance adhesion area on a light-receiving surface of an image pickup unit is detected so that an image in the detected area is interpolated, for example, using information on an image around the image in the detected area or so that a user is informed of the necessity to clean the light-receiving surface of the image pickup unit.
Japanese Patent Laid-Open No. 2000-312314(corresponding to U.S. Pat. No. 6,791,608) discloses a technique in which a value of image information corresponding to each pixel in an image pickup device is compared with a predetermined value to detect the presence/absence of adhesion of foreign substance, and interpolation is performed for each of the pixels having the foreign substance using the image information on pixels surrounding the pixels having the foreign substance. In this case, positions of defective pixels in the image pickup device are stored in advance, and a value of image information corresponding to each of the defective pixels is not compared with the predetermined value. In this way, pixels having foreign substance are discriminated from defective pixels.
Furthermore, Japanese Patent Laid-Open No. 2003-298924 discloses a technique in which the total amount of light received in a pixel area including a plurality of pixels is obtained when an image pickup device receives predetermined uniform light, and further, an amount of light lost is obtained by comparing the total amount of light received with an amount of the light that should be received to determine whether or not the area includes foreign substance.
An image pickup device, such as a charge-coupled device (CCD) sensor or a complementary metal-oxide semiconductor (CMOS) sensor, included in a digital camera has a so-called white spot, which is a defective pixel having a considerable amount of dark current. The white spot causes deterioration of image performance. The defective pixel is compensated for by means of image information on non-defective pixels positioned around the defective pixel, resulting in improvement in the yield of an expensive image pickup device. Each of the positions of the defective pixel is mainly detected when a digital camera is fabricated, and position information on the detected position is stored in a storage device in the digital camera. In accordance with the position information on the defective pixel stored in the storage device, the defective pixel is compensated for every time an image is captured.
An image pickup device includes defective pixels generated when a digital camera is fabricated. In addition, the image pickup device may include defective pixels generated as time advances. In this case, since the defective pixels are newly generated after a user purchased a digital camera, position information on the newly generated defective pixels is not stored in the storage device.
In Japanese Patent Laid-Open No. 2000-312314, a value of image information corresponding to each of the defective pixels, position information on which is stored in the storage device in advance, is not compared with the predetermined value when the detection of pixels having foreign substance is attempted. However, a value of image information corresponding to each of the newly generated defective pixels is compared with the predetermined value. A determination as to whether or not foreign substance is attached to each of the pixels is performed in accordance with the comparison. Accordingly, even when foreign substance is attached to the newly generated defective pixels, a detection error may occur on the basis of the degree of defect.
In Japanese Patent Laid-Open No. 2003-298924, when an area to be subjected to integration includes a newly generated defective pixel, the integration value is greater than a value of image information in the defective pixel. Accordingly, depending on the degree of defect, an area including foreign substance may not be detected accurately.
Thus, an area having foreign substance is not detected accurately, and a shadow of the foreign substance is included in a captured image.